from utils.yaml_utils import read_yaml


class Blogdetail():
    url="http://1.95.48.126:9090/blog/getBlogDetail?blogId="
    method="GET"

    blogdetail_schema={
        "type": "object",
        "properties": {
            "code": {
                "type": "string",
                "enum": ["SUCCESS"]
            },
            "errMsg": {
                "type": "string"
            },
            "data": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "title": {
                        "type": "string"
                    },
                    "content": {
                        "type": "string"
                    },
                    "userId": {
                        "type": "integer"
                    },
                    "deleteFlag": {
                        "type": "integer",
                        "enum": [0, 1]
                    },
                    "createTime": {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}$"
                    },
                    "updateTime": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "loginUser": {
                        "type": "boolean"
                    }
                },
                "required": [
                    "id", "title", "content", "userId", "deleteFlag", "createTime", "updateTime", "loginUser"
                ],
                "additionalProperties": False
            }
        },
        "required": ["code", "errMsg", "data"],
        "additionalProperties": False
    }

blogdetail_paramenter=Blogdetail()